home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
magicwb
/
czesc_2
/
mwb_dopus
/
arexx
/
winswap.dopus5
< prev
next >
Wrap
Text File
|
1995-07-16
|
3KB
|
83 lines
/* WinSwap v1.00 [16-Jul-1995] for Directory Opus 5.
By Leo Davidson ("Nudel", Pot-Noodle/Gods'Gift Utilities)
NOTE: This script _requires_ DOpus v5.11 or above.
This script will swap around your source and destination listers,
like the old swap command in DOpus4.
If you specify the "PathOnly" option, each lister will read the other's
path but their window positions will remaind the same. Otherwise, the
two listers physically swap window positions. For the user the end
result is identical. However, if the two windows are different sizes
swapping the windows may be slower than swapping the paths, while if
the two windows are the same size, swapping the paths may be slower.
Of course, it all depends on the speed of your machine and the size
of the directories, so experiment and see which one you prefer.
Obviously, in DOpus5 it is possible to simply move the two lister
windows, but somethimes this isn't desireable. For example, when they
are locked in place via the option in the pull-off menu; when you're
too lazy to move the windows; or when the two windows are positioned
such that moving them would be difficult or would make a mess.
Call as:
------------------------------------------------------------------------------
ARexx DOpus5:ARexx/WinSwap.dopus5 {Qp} [PathOnly]
------------------------------------------------------------------------------
Turn off all switches.
*/
options results
options failat 99
signal on syntax;signal on ioerr /* Error trapping */
parse arg DOpusPort PathOnlyOption
DOpusPort = Strip(Strip(DOpusPort,"B"," "),"B",'"')
PathOnlyOption = Strip(Strip(PathOnlyOption,"B"," "),"B",'"')
If DOpusPort~="" THEN Address value DOpusPort
ELSE Do
Say "Not correctly called from Directory Opus 5!"
Say "Load this ARexx script into editor for more info."
EXIT
END
lister query source stem source_handle.
IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
dopus request '"You must have a SOURCE lister!" OK'
EXIT
End
lister query dest stem dest_handle.
IF dest_handle.count = 0 | dest_handle.count = "DEST_HANDLE.COUNT" Then Do
dopus request '"You must have a DESTINATION lister!" OK'
EXIT
End
If PathOnlyOption = "PathOnly" Then Do
lister query source_handle.0 path
source_path = RESULT
lister query dest_handle.0 path
dest_path = RESULT
lister read source_handle.0 dest_path
lister read dest_handle.0 source_path
END
Else Do
lister query source_handle.0 position
source_position = RESULT
lister query dest_handle.0 position
dest_position = RESULT
lister set source_handle.0 position dest_position
lister set dest_handle.0 position source_position
END
syntax:;ioerr: /* In case of error, jump here */
EXIT